<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

namespace app\cpmjagent\model\user;

/**
 * Description of GameUserModel
 *
 * @author SoChishun
 */
class GameUserModel extends \app\cpmjagent\model\AppbaseModel {
    protected $table = 't_users';
    protected $pk = 'userid';
    protected  function getAccountmaskAttr(){
        $value=$this->account;
        $intValueLength=strlen($value);
        if($intValueLength<11){
            return $value;
        }
        
        return substr($value,0,3).'*****'.substr($value, 8);
    }
    protected function getNameTextAttr(){
        $value=$this->data['name'];        
        $value= iconv("latin1","UTF-8",$value);
        $value=base64_decode($value);
        return $value;
    }
}
